| Conditions | 2 | 
| Total Lines | 13 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | import { | 
            ||
| 24 | |||
| 25 | @Post()  | 
            ||
| 26 |   @ApiOperation({title: 'Create new daily rate'}) | 
            ||
| 27 |   public async index(@Body() dto: DailyRateDTO) { | 
            ||
| 28 |     try { | 
            ||
| 29 |       const {userId, customerId, taskId, amount} = dto; | 
            ||
| 30 | const id = await this.commandBus.execute(  | 
            ||
| 31 | new CreateDailyRateCommand(amount, userId, customerId, taskId)  | 
            ||
| 32 | );  | 
            ||
| 33 | |||
| 34 |       return {id}; | 
            ||
| 35 |     } catch (e) { | 
            ||
| 36 | throw new BadRequestException(e.message);  | 
            ||
| 37 | }  | 
            ||
| 40 |